@extends('admin.layouts.app')
@section('content')

                        <!-- Page-Title -->
                        <div class="row">
                            <div class="col-sm-12">
                                <h4 class="page-title">平台管理</h4>
                                <ol class="breadcrumb">
                                    <li><a href="#">系统</a></li>
                                    <li><a href="{{url('zadmin/product')}}">作品管理</a></li>
                                    <li class="active">添加作品</li>
                                </ol>
                            </div>
                        </div>
                        
                        <div class="row">
                        	<div class="col-lg-12">
                        		<div class="card-box">
                            <h2 class="m-t-0 header-title">添加作品</h2>
                            <hr/>
                             
                              @include('admin.common.error')
                        			<div class="row">
			                        	<div class="col-md-9">
              <form class="form-horizontal" role="form" action="{{url('zadmin/arts')}}" method="post" enctype="multipart/form-data">

              <div class="form-group">
                <label class="col-md-2 control-label">标题</label>
                <div class="col-md-10">
                  <input type="text" class="form-control" name="name" required="" value="" >
                </div>
              </div>

              <div class="form-group">
                <label class="col-md-2 control-label">栏目</label>
                <div class="col-md-10">
                  <select  class="form-control" name="type_id" required="" >
                    <option value="">请选择</option>
                    @foreach($types as $t)
                    <option value="{{$t->id}}">{{$t->name}}</option>
                    @endforeach
                  </select>
                </div>
              </div>

              <div class="form-group">
                <label class="col-md-2 control-label">封面图</label>
                <div class="col-md-10">
                    <input type="file" class="form-control" name="pic" />
                </div>             
              </div> 

           <div class="form-group">
                                                  <label class="col-md-2 control-label">内容</label>
                                                  @include('vendor.ueditor.assets')
                                                  <div class="col-md-10">
                                                      <!-- 实例化编辑器 -->
<script type="text/javascript">
    var ue = UE.getEditor('container');
    ue.ready(function() {
        ue.execCommand('serverparam', '_token', '{{ csrf_token() }}'); // 设置 CSRF token.
    });
</script>

<!-- 编辑器容器 -->
<script id="container" name="contents" type="text/plain"></script>
                                                  </div>
                                              </div> 
                                              

                                              

                                              <div class="form-group text-center">
                                                  
                                                  <button type="submit" class="btn btn-info waves-effect waves-light">保存</button>
                                              </div>
                                              
                                              
                             {{csrf_field()}}
                                          </form>
                                </div>
			                        	
			                        </div>

                             
			                        
                        			
                        		</div>
                                
                            </div> <!-- end col -->

                            
                        </div>
@endsection
                        
                        
                        

                  
            
    @section('modal')        
     
    @endsection        
       

           



    
        @section('js')

        
        @endsection
    
